﻿<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <title>新建成员</title>
    <!--common-->
    <link href="/resources/src/css/admin.css" rel="stylesheet">
</head>
<body class="sticky-header">
    
    <section>
        <div class="left-side sticky-left-side">
            <div class="logo">
                <a href="javascript:;"><img src="//img3.tbcdn.cn/tfscom/TB13UCJKVXXXXaLXpXXSutbFXXX.jpg_100x100.jpg" alt=""></a> 
            </div>            
             <!--sidebar nav start-->
            <ul class="admin-nav">
                <li class="nav-active"><a href="javascript:;">用户管理</a></li>
                <li><a href="javascript:;">项目管理</a></li>
                <li><a href="javascript:;">机构管理</a></li>
                <li><a href="javascript:;">消息管理</a></li>
                <li><a href="javascript:;">用户行为数据</a></li>
                <li><a href="javascript:;">反馈内容</a></li>
                <li><a href="javascript:;">申请试用</a></li>
            </ul>
        </div>

        <div class="main-content">
            <!-- header section start-->
            <div class="header-section">
               <ul class="menu-right">
                   <li><a href="javascript:;"><i class="iconfont icon-user"></i> Soure</a></li>
               </ul>
            </div>
            <!-- header section end-->            
            <div class="wrapper">
                <div class="user-content">
                    <div class="create-page">                        
                        <h3>新建成员</h3>
                        <form id="createUser">
                            <div class="item clearfix">
                                <div class="item-label pull-left">                                    
                                    <label for="c_userType">用户类型：</label>
                                </div>
                                <div class="pull-left">  
                                    <select name="c_userType" id="c_userType">
                                        <option value="0">管理员</option>
                                        <option value="1">机构账号</option>
                                        <option value="2">普通用户账号</option>
                                    </select>
                                </div>
                            </div>
                            <div class="item clearfix">
                                <div class="item-label pull-left">                                    
                                    <label for="c_userEmail" class="lab">邮箱：</label>
                                </div>
                                <div class="pull-left">  
                                    <input type="text" id="c_userEmail" name="c_userEmail">
                                </div>
                            </div>
                            <div class="item clearfix">
                                <div class="item-label pull-left">                                    
                                    <label for="c_userPhone" class="lab">手机：</label>
                                </div>
                                <div class="pull-left">  
                                    <input type="text" id="c_userPhone" name="c_userPhone">
                                </div>
                            </div>
                            <div class="item clearfix">
                                <div class="item-label pull-left">                                    
                                    <label for="c_userbeginPass" class="lab">初始密码：</label>
                                </div>
                                <div class="pull-left">  
                                    <input type="text" id="c_userbeginPass" name="c_userbeginPass">
                                </div>
                            </div>
                            <div class="item clearfix">
                                <input type="submit" class="c_user_submit">
                            </div>
                        </form>
                    </div>
                </div>    
            </div>
        </div>
    </section>
    
    <script src="http://lib.sinaapp.com/js/jquery/1.9.1/jquery-1.9.1.min.js"></script>
    <script src="https://cdn.bootcss.com/jquery.nicescroll/3.7.0/jquery.nicescroll.js"></script>    
    <script src="/resources/src/js/jquery.validate.min.js"></script>
    <script src="/resources/src/js/messages_zh.js"></script>
    <script src="/resources/src/js/main.js"></script>
    <script>
        $("#createUser").validate({
            debug:true,
            rules: {
              c_userEmail:{
                required:true,
                email:true
              },
              c_userPhone:{
                required:true,
                isPhone:true
              },
              c_userbeginPass:{
                required:true,
                maxlength: 18,
                minlength: 6
              }
            },
            messages: {
               c_userEmail:{
                 required: "请输入邮箱",
                 email:'请输入正确的邮箱'
               },
               c_userPhone:{
                 required: "请输入手机",
                 isPhone:'请输入正确的手机'
               },
               c_userbeginPass:{
                 required: "请设置初始密码",
                 maxlength: "初始密码不得超过18位",
                 minlength: "初始密码不得小于6位",
               }
            },
            submitHandler:function(form){
                
            }
        });
        jQuery.validator.addMethod("isPhone", function(value, element) {
            var phone = new RegExp(/^(((13[0-9]{1})|(15[0-9]{1})|(17[0-9]{1})|(18[0-9]{1}))+\d{8})$/);
            return this.optional(element) || (phone.test(value));
        }, "请填写正确的手机号码");
    </script>
</body>
</html>